﻿@using ZLJ.Application.Share.AssociatedCompany

@inherits ZLJ.RCL.Components.CreateBaseComponent<AssociatedCompanyDto, AssociatedCompanyEditDto>

<SectionContent SectionName=@($"{Master}-create-body")>
    <Form @ref="frm" ValidateOnChange="true" Model="createDto" LabelColSpan="3" WrapperColSpan="21" OnFinish="OnFinish">

        <FormItem>
            <Input @bind-Value="@context.Name" AllowClear />
        </FormItem>
        <FormItem>
            <Input @bind-Value="@context.LinkMan" AllowClear />
        </FormItem>
        <FormItem>
            <Input @bind-Value="@context.LinkPhone" AllowClear />
        </FormItem>
        <FormItem Label="所属地区">
            <AdministrativeTreeSelect @bind-TreeIdNullable=context.AreaId IsKeyId AllowClear />
        </FormItem>
        <FormItem>
            <Input @bind-Value="@context.Address" AllowClear />
        </FormItem>
        <FormItem Label="级别">
            <TreeSelectDataDictionary @bind-TreeIdNullable=context.LevelId IsKeyId AllowClear ParentName="kehuJibie" />
        </FormItem>
        <FormItem Label="是否启用">
            <Switch @bind-Checked=context.IsActive />
        </FormItem>

    </Form>
</SectionContent>

<SectionContent SectionName=@($"{Master}-create-btns")>
    <Checkbox @bind-Checked=isSaveAndContinue>保存后继续新增</Checkbox>
    <Button OnClick="BtnResetClick" Icon=@IconType.Outline.Redo>重置</Button>
    <Button OnClick="BtnSaveClick" Type=@ButtonType.Primary Loading=isSaving Disabled=IsBusy Icon=@IconType.Outline.Save>保存</Button>
</SectionContent>